package db.migration;

import javax.persistence.*;
import java.util.Objects;

/**
 * @date 19-10-31
 * @auther jackliang
 * @description TODO
 */
@Entity
@Table(name = "k_system", schema = "permission", catalog = "")
public class KSystemEntity {
    private int id;
    private int systemName;
    private String systemClassify;
    private Long createTime;
    private Long updateTime;
    private Integer status;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "system_name", nullable = false)
    public int getSystemName() {
        return systemName;
    }

    public void setSystemName(int systemName) {
        this.systemName = systemName;
    }

    @Basic
    @Column(name = "system_classify", nullable = true, length = 11)
    public String getSystemClassify() {
        return systemClassify;
    }

    public void setSystemClassify(String systemClassify) {
        this.systemClassify = systemClassify;
    }

    @Basic
    @Column(name = "create_time", nullable = true)
    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time", nullable = true)
    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        KSystemEntity that = (KSystemEntity) o;
        return id == that.id &&
                systemName == that.systemName &&
                Objects.equals(systemClassify, that.systemClassify) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, systemName, systemClassify, createTime, updateTime, status);
    }
}
